import React, { Component } from 'react'
import School from './components/School'
import Weather from './components/Weather'

import './App.css'

export default class App extends Component {
	state = {sum:0}
	render() {
		const {sum} = this.state
		return (
			<div className="app">
				<h2>我是App组件</h2>
				<Weather sum={sum} appAdd={this.appAdd}/>
				<br/>
				<School sum={sum}/>
			</div>
		)
	}
	appAdd = (value)=>{
		this.setState({sum:value})
	}
}
